<?php
/**
 * Created by PhpStorm.
 * User: 96572
 * Date: 2017/5/1
 * Time: 15:21
 */
use yii\helpers\Html;
use yii\helpers\Url;

/* @var $this yii\web\View */
/* @var $model app\modules\admin\models\User */
/* @var $roles \yii\rbac\Role */

?>
<div class="role-list">

    <h1><?= Html::encode($this->title) ?></h1>
    <table class="table table-bordered table-hover">
        <thead>
        <tr>
            <th>角色名词</th>
            <th>角色描述</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <?php foreach ($roles as $role){?>
            <tr>
                <td><?=$role->name?></td>
                <td><?=$role->description?></td>
                <td>
                    <a href="<?=Url::toRoute(['edit','name'=>$role->name])?>">修改</a>
                    <a href="<?=Url::toRoute(['update-permission','name'=>$role->name])?>">修改角色权限</a>
                </td>
            </tr>
        <?php }?>
        </tbody>
    </table>

</div>